import auto.People;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context=new ClassPathXmlApplicationContext("application.xml");
//        Student s1=context.getBean(Student.class);
//        Student s2=context.getBean(Student.class);
//        System.out.println(s1.getName());
//        System.out.println(s2.getName());
//        System.out.println(s1);
//        System.out.println(s2);
        People zs=context.getBean("zs",People.class);
        System.out.println(zs);
        System.out.println("姓名："+zs.getName());
        System.out.println("手机："+zs.getPhone().getBrand());
        System.out.println("电脑："+zs.getPc().getBrand());

    }
}
